from django.urls import path

from rest_framework.routers import SimpleRouter

from station.views import station, guowangbuliang,pbom
from station.views.weldspot import handian, hanqiang,cailiao
router =SimpleRouter()
router.register(r'station', station.StationViewSet, basename='station')
# router.register(r'torque', torque.TorqueViewSet, basename='torque')
router.register(r'guowangbuliang', guowangbuliang.GuowangbuliangViewSet, basename='guowangbuliang')
router.register(r'guowangbuliangimage', guowangbuliang.GuowangbuliangImageViewSet, basename='guowangbuliangimage')
# router.register(r'jiajutiaozhengtaizhang', jiajutiaozhengtaizhang.JiajutiaozhengtaizhangViewSet,basename='jiajutiaozhengtaizhang')
# router.register(r'jiajutiaozhengtaizhangimage', jiajutiaozhengtaizhang.JiajutiaozhengtaizhangImageViewSet,basename='jiajutiaozhengtaizhangimage')
router.register(r'pbom', pbom.PbomViewSet,basename='pbom')
router.register(r'weldspot/handian',handian.HandianViewSet ,basename='weldspot_handian')
router.register(r'weldspot/hanqiang',hanqiang.HanqiangViewSet ,basename='weldspot_hanqiang')
router.register(r'weldspot/cailiao',cailiao.CailiaoViewSet ,basename='weldspot_cailiao')


from django.http import  HttpResponse

def home(request):
    return HttpResponse("Hello World aaa")

urlpatterns = [
    path('testurl', home, name='home')
]

urlpatterns += router.urls

